projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41d5998
)
Make testsplitheaders more robust
author
Matthias Clasen
<mclasen@redhat.com>
Tue, 7 Jan 2014 17:44:34 +0000
(12:44 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Tue, 7 Jan 2014 18:45:55 +0000
(13:45 -0500)
Same empty string issue that I fixed in GtkHeaderBar a few days
ago.
tests/testsplitheaders.c
patch
|
blob
|
history
diff --git
a/tests/testsplitheaders.c
b/tests/testsplitheaders.c
index 38ec298c7e9ac72e282ea021ba0ba7e50fa58145..5becbdb0c3a775f1158773951706ba3ac2981b99 100644
(file)
--- a/
tests/testsplitheaders.c
+++ b/
tests/testsplitheaders.c
@@
-16,8
+16,12
@@
split_decorations (GtkSettings *settings,
p = g_strsplit (layout, ":", -1);
- p1 = g_strconcat (p[0], ":", NULL);
- p2 = g_strconcat (":", p[1], NULL);
+ p1 = g_strconcat ("", p[0], ":", NULL);
+
+ if (g_strv_length (p) >= 2)
+ p2 = g_strconcat (":", p[1], NULL);
+ else
+ p2 = g_strdup ("");
gtk_header_bar_set_decoration_layout (GTK_HEADER_BAR (sheader), p1);
gtk_header_bar_set_decoration_layout (GTK_HEADER_BAR (mheader), p2);